home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 43
/
Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso
/
Aminet
/
comm
/
tcp
/
Amster-main.lha
/
Amster_Install
/
Rexx
/
Whois_example.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
2000-08-22
|
2KB
|
67 lines
/*
** Amster WhoIs Demo
**
** Usage: RX Whois_example <nick>
*/
parse arg String
address 'AMSTER.1'
Link.0 = "Unknown"
Link.1 = "14.4K Modem"
Link.2 = "28.8K Modem"
Link.3 = "33.6K Modem"
Link.4 = "56K Modem"
Link.5 = "ISDN 64K"
Link.6 = "ISDN 128K"
Link.7 = "Cable"
Link.8 = "DSL"
Link.9 = "T1"
Link.10 = "T3+"
ISONLINE
if RC = 0 then CONNECT
ISONLINE
do while RC = 0
call delay(50)
ISONLINE
end
WHOIS String 'LUSER'
if RC = 0 then do
Speed = LUSER.LINK
Hours = LUSER.TIME % 3600
Minutes = (LUSER.TIME % 60) - (Hours * 60)
Seconds = LUSER.TIME - (Hours * 3600) - (Minutes * 60)
OnlineTime = Hours":"Right("00"||Minutes,2)":"Right("00"||Seconds,2)
say 'WHOIS'
say '-----'
say 'Nick: 'LUSER.NICK
say 'Level: 'LUSER.LEVEL
say 'Time: 'OnlineTime
say 'Channels: 'LUSER.CHANNELS
say 'Status: 'LUSER.STATUS
say 'Shares: 'LUSER.SHARES
say 'Downloads: 'LUSER.DOWNLOADS
say 'Uploads: 'LUSER.UPLOADS
say 'Link: 'Link.Speed
say 'Client: 'LUSER.CLIENT
end
else if RC = 1 then do
Logoff = Date('N',LUSER.LASTSEEN % (60*60*24), 'I')
ElapSec = ((LUSER.LASTSEEN / (60*60*24)) - (LUSER.LASTSEEN % (60*60*24))) * 60 * 60 * 24 % 1
Hours = ElapSec % 3600
Minutes = (ElapSec % 60) - (Hours * 60)
Seconds = ElapSec - (Hours * 3600) - (Minutes * 60)
OfflineTime = Hours":"Right("00"||Minutes,2)":"Right("00"||Seconds,2)
say 'WHOWAS'
say '------'
say 'Nick: 'LUSER.NICK
say 'Level: 'LUSER.LEVEL
say 'Last seen: 'Logoff" "OfflineTime
end
else say 'Failed!'